Repository navigation
test(guards): memory-usage sqlite cases quote the sqlite3 path and drop its CR (CC-696, refs #783) - #787
Merged
Conversation
…d drop its CR (CC-696, refs #783) Three memory-usage cases read the database with an unquoted $real_sqlite, so a binary under a profile directory that holds a space ("/c/Users/Lien Chen/...") was split into words, the query printed nothing and the report said "missing" although the database was right. A native sqlite3 also prints CRLF and the command substitution keeps the CR. The cases now quote the path and drop the CR; the product code is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESW7P9wHJRbhxx3v7XyQuq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #783 (CC-696). Fixes the three
memory-usage/sqlite-*cases. The two concurrency cases in the report did not reproduce here, so #783 stays open for them (the #738 acceptance of 50 parallel writers is still unverified on native Windows).根因
資料庫其實寫對了(手動重現:
card_usage有a.md|1|100,metadata有total_events)。是測試讀它的方式錯了:$($real_sqlite "$db" ...)沒有加引號。real_sqlite是/c/Users/Lien Chen/AppData/.../sqlite3,路徑含空白就被拆開,指令找不到、輸出為空,報告成count=missing。sqlite3輸出\r\n,bash 的命令替換只去掉結尾的\n,指令成功也會多一個\r,與預期字串不相等。修法
三個案例的
$real_sqlite加引號,輸出接tr -d '\r'。產品程式memory_usage_commit沒有改。BACKLOG 加 CC-696,並把 CC-695 記上pr:#786。驗證(原生 Windows,使用者目錄
Lien Chen含空白)test-guards.sh --filter memory-usage:main 上 12 通過 3 失敗(三個 sqlite 案例),改後 15 通過 0 失敗。concurrent-no-lost-updates約 12 秒、contention-matrix約 34 到 46 秒,連跑三次都過。我沒有改它們,也不能說它們已修;它們的 20 秒期限在負載高時可能不夠。Review (commands/ship.md Step 2.5)
PASS: no warranted refactor/reuse change: the three sites are one-line quote and pipe changes in test code; a shared query helper would be a new abstraction for three lines.🤖 Generated with Claude Code
Review (commands/ship.md Steps 2.5 and 3)
PASS: no warranted refactor/reuse change. No sqlite or CR helper exists intests/lib; the three sites are one-line quote and pipe changes, a shared helper would be a new abstraction for three lines.no_gap)gate-20261105-143957.md(gate-20261105-053918-d811d2),pmctl gate waitverified ittest-guardssuite; the 50-writer native-Windows acceptance limit stays open (CC-696 "not reproduced" note).